package ro.gillardon.persistence;

import ro.gillardon.persistence.document.model.Reservation;
import ro.gillardon.persistence.exception.PersistenceException;

/**
 * Interface which specifies the possible methods which can be applied on a Reservation.
 *
 * @author haiurar
 */
@FunctionalInterface
public interface ReservationDAO {

  /**
   * Saves the reservation in DB.
   *
   * @param reservation the reservation details (user, startDate, endDate...)
   * @return the added reservation
   * @throws PersistenceException in case of error
   */
  public Reservation save(Reservation reservation) throws PersistenceException;

}
